#ifndef CONSTANTE_H_INCLUDED
#define CONSTANTE_H_INCLUDED

struct fantome
{SDL_Rect posfan;
SDL_Surface *fan[8];
};
typedef struct fantome fantome;

struct vie{
	SDL_Surface *vie;
	
};
typedef struct vie vie;

struct vide
{
SDL_Rect posvide;
SDL_Surface *vid;
};
typedef struct vide vide;


SDL_Surface *pastille;


struct Pacman{
	SDL_Rect pos; //x,y,w,h
	int direction; //0:right 1:left 2:up 3:down
	SDL_Surface *TabImage[8]; //tab[0] :adresse de image right bouche ouverte,1:right bouche ferme
};
typedef struct Pacman pacman;


SDL_Surface *screen;
SDL_Surface *image;
SDL_Surface *past;
SDL_Surface *vid;
SDL_Surface *gameover;
SDL_Surface *vainqueur;
SDL_Surface *cliquer;
SDL_Surface *fruit;
SDL_Rect pos_fruit;
SDL_Rect pos_cliquer;
SDL_Rect pos_vainqueur;
SDL_Rect pos_gameover;
SDL_Rect src;
SDL_Rect posvie;
SDL_Event event;

int done=1,continuer;
int viepac=5;
int k,j,carte[17][19];
int scores=0;
int direction=0;
int nombre_aleatoire = 0; //fantome random
int x1,x2,x3,y;


//chargement de la carte
int carte1[17][19] = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0},
{0,1,0,0,1,0,0,0,1,0,1,0,0,0,1,0,0,1,0},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
{0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
{0,0,0,0,0,0,1,0,0,3,0,0,1,0,0,0,0,0,0},
{1,1,1,1,1,1,1,0,3,3,3,0,1,1,1,1,1,1,1},
{0,0,1,0,0,0,1,0,3,3,3,0,1,0,0,1,0,0,0},
{0,1,1,1,1,1,1,0,3,3,3,0,1,1,1,1,1,1,0},
{0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
{0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0},
{0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0},
{0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0},
{0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
};


#endif
